
//---------------------------------------------------------------------------
#ifndef PG1_RENDERTYPES_H
#define PG1_RENDERTYPES_H
//---------------------------------------------------------------------------
#include "pg1_api.h"
//---------------------------------------------------------------------------
// DirectX forward declarations
struct IDirect3DTexture9;
//---------------------------------------------------------------------------
namespace pg1
{
//---------------------------------------------------------------------------
struct PG1_API ColorVertex
{
	float x;
	float y;
	float z;

	DWORD color;
};

extern const int ColorVertexType;
//---------------------------------------------------------------------------
struct PG1_API TexCoordVertex
{
	float x;
	float y;
	float z;

	float u;
	float v;
};

extern const int TexCoordVertexType;
//---------------------------------------------------------------------------
// textures

typedef IDirect3DTexture9* Texture;
static const Texture NoTexture = NULL;

//---------------------------------------------------------------------------
// primitives

enum Primitive
{
	TriangleList = 0,
	TriangleStrip,
	PointList,
    LineList,
    LineStrip,
	TriangleFan,
	PrimitiveCount
};

//---------------------------------------------------------------------------
// matrices

enum MatrixType
{
	View = 0,
	Projection,
	World,
	MatrixTypeCount
};
//---------------------------------------------------------------------------
// build an unsigned int from color (see D3DCOLOR_XRGB)

#define PG1_COLOR_ARGB(a,r,g,b) ((DWORD)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
#define PG1_COLOR_RGB(r,g,b) PG1_COLOR_ARGB(0xff,r,g,b)

//---------------------------------------------------------------------------
} // end namespace
//---------------------------------------------------------------------------
#endif // PG1_RENDERTYPES_H
//---------------------------------------------------------------------------
